﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Thksoft.helpDoc.Default" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>操作手册</title>
    <link rel="stylesheet" type="text/css" href="Document.css" />
</head>
<body scroll="no" style="background-color:White">
    <form id="form1" runat="server">
    <div>
        <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td style="height: 90px;">
                    <div class="helpBg" >
                    </div>
                    <div class="helpMain">
                    </div>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    <div class="navPart" id="navPart">
                        <asp:TreeView ID="navTree" runat="server" Style="padding: 5px;" ImageSet="WindowsHelp"
                            ExpandDepth="1" Height="100%">
                            <HoverNodeStyle BackColor="LightSkyBlue" CssClass="hoveredNode" />
                            <SelectedNodeStyle CssClass="selectedNode" />
                            <NodeStyle CssClass="node" />
                        </asp:TreeView>
                    </div>
                    <div id='navDirection' class="navDirection" >
                    </div>
                    <iframe id='contentFrame' frameborder='0' class="contentFrame" scrolling="auto"></iframe>
                </td>
            </tr>
        </table>
    </div>
    </form>
    <script type="text/javascript">
        var catelog = <%=DocumentItemsString %>;
	    function ProcessNavNode(index){
	        var node = document.getElementById("navTreen" + index);
	        if(node){ // 含子节点的进行Toggle处理
	            if(eval('navTreen' + index + 'Nodes').style.display == 'none'){
	                TreeView_ToggleNode(navTree_Data, index ,eval('navTreen' + index),' ',eval('navTreen' + index + 'Nodes'));
	            }
	            TreeView_SelectNode(navTree_Data, node, node.id);
	        }
	        // 更新内容页
	        document.getElementById("contentFrame").src = catelog[index].path + "/Index.html";
	        // 刷新标题
	        document.title = catelog[index].text;
	        // 循环上级展开
	        var parent = catelog[index].index;

	        var direction = catelog[index].text;

	        while(parent != -1){
	            if(eval('navTreen' + parent + 'Nodes').style.display == 'none'){
	                TreeView_ToggleNode(navTree_Data, parent ,eval('navTreen' + parent),' ',eval('navTreen' + parent + 'Nodes'));
	            }
	            direction = "<a href='#' onclick=ProcessNavNode(" + parent + ")>"
	                        + catelog[parent].text + "</a> &gt; " + direction;
	            parent = catelog[parent].index;
	        }
	        document.getElementById('navDirection').innerHTML = "<b>■</b>&nbsp; " + direction;
	    }

        //兼容火狐 IE 360
        function getContentSize() {
           var wh = document.body.clientWidth;
           var hi = document.body.clientHeight;
           document.getElementById("navPart").style.height = hi-94;           
           document.getElementById("contentFrame").style.width = wh-244;
           document.getElementById("contentFrame").style.height = hi-120;           
        }

        window.onload = getContentSize;
        window.onresize = getContentSize;

    </script>
</body>
</html>
